import request from '@/request/request';
import qs from 'qs';
//精品
export const JinPinAPI = () => request.get('/products/recommend');
//热门
export const hotAPI = () => request.get('/products/hot');
export const sendSMSAPI = val => request.post('/sendSMS', qs.stringify(val));
export const phoneReginAPI = val => request.post('/phoneRegin', qs.stringify(val));
export const WeixinLoginApi = params => request.post(`/wechatUsers/PCLogin`, qs.stringify(params));
export const binweixinApi = params => request.post(`/wechatUsers/binding`, qs.stringify(params));
//获取用户信息
export const UserFileAPI = () => request.get('/shop/userProfiles');
//获取商品详情信息
export const GoodsDetailsAPI = id => request.get(`/products/${id}`);
//加入购物车
export const addcartAPI = params => request.post(`/shop/carts/add`, qs.stringify(params));
//请求全部商品
export const GoodsSearchsAPI = params => request.get(`/products`, { params });
//查看购物车
export const shopCartAPI = () => request.get('/shop/carts');
//删除商品
export const deletecartAPI = params => request.delete(`/shop/carts?productIds=${params.id}`);
